import React, { useState } from 'react'
import '../static/style/components/MyList.less'
import { CalendarTwoTone, FolderAddTwoTone, FireTwoTone } from '@ant-design/icons';
import { Row, Col, List } from 'antd'
import Link from 'next/link'

const MyList = (props) => {
    const config = props;

    return (
        <List
            {...config}
            renderItem={item => (
                <List.Item>
                    <div className="list-title">
                        <Link href={{ pathname: '/detailed', query: { id: item.id } }}>
                            <a>{item.title}</a>
                        </Link>
                    </div>
                    <div className="list-icon">
                        <span><CalendarTwoTone /> {item.addTime}</span>
                        <span><FolderAddTwoTone /> {item.typeName}</span>
                        <span><FireTwoTone /> {item.view_count}人</span>
                    </div>
                    <div className="list-context">{item.introduce}</div>
                </List.Item>
            )}
        />
    )
}

export default MyList
